<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of privileges
 *
 * @author pcuryllo
 */
class Privileges {
    const ADMIN = 10;
    const MODERATOR = 20;
    const USER = 30;
    const BOT = 40;
    
    public static function getString($id_privileges)
    {
        $id_privileges = intval($id_privileges);
        
        switch($id_privileges)
        {
            case Privileges::ADMIN      : $str = "ADMIN"; break;
            case Privileges::MODERATOR  : $str = "MODERATOR"; break;
            case Privileges::USER       : $str = "USER"; break;
            case Privileges::BOT        : $str = "BOT"; break;
            default: $str = "ERROR ID";
        }
        return $str;
    }
    
    public static function getArray()
    {
        return array(
            Privileges::ADMIN       =>  "ADMIN",
            Privileges::MODERATOR   =>  "MODERATOR",
            Privileges::USER        =>  "USER",
            Privileges::BOT         =>  "BOT"
            );
    }
}

?>
